home *** CD-ROM | disk | FTP | other *** search
- /********************************************************************************
-
- Gnucleus - A node application for the Gnutella network
- Copyright (C) 2000 John Marshall
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
- For support, questions, comments, etc...
- E-Mail:
- swabby@c0re.net
-
- Address:
- 21 Cadogan Way
- Nashua, NH, USA 03062
-
- ********************************************************************************/
-
- // ChildFrm.cpp : implementation of the CChildFrame class
- //
-
- #include "stdafx.h"
- #include "Gnucleus.h"
- #include "GnucleusDoc.h"
-
- #include "ChildFrm.h"
-
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame
-
- IMPLEMENT_DYNCREATE(CChildFrame, CMDIChildWnd)
-
- BEGIN_MESSAGE_MAP(CChildFrame, CMDIChildWnd)
- //{{AFX_MSG_MAP(CChildFrame)
- ON_WM_CLOSE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
-
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame construction/destruction
-
- CChildFrame::CChildFrame()
- {
- // TODO: add member initialization code here
-
- }
-
- CChildFrame::~CChildFrame()
- {
- }
-
- BOOL CChildFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- cs.style &= ~FWS_ADDTOTITLE;
-
- cs.lpszName = "Connected to 0 Nodes";
-
- if( !CMDIChildWnd::PreCreateWindow(cs) )
- return FALSE;
-
- return TRUE;
- }
-
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame diagnostics
-
- #ifdef _DEBUG
- void CChildFrame::AssertValid() const
- {
- CMDIChildWnd::AssertValid();
- }
-
- void CChildFrame::Dump(CDumpContext& dc) const
- {
- CMDIChildWnd::Dump(dc);
- }
-
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CChildFrame message handlers
-
-
-
- void CChildFrame::OnClose()
- {
- CString Title;
-
- GetWindowText(Title);
- if(Title.Find("Connect") == 0 || Title.Find("Transfers") == 0)
- {
- ShowWindow(SW_HIDE);
- return;
- }
-
- CMDIChildWnd::OnClose();
- }
-